from django import forms
from .models import Message

class MessageForm(forms.ModelForm):
    class Meta:
        model = Message
        fields = ['content']
        widgets = {
            'content': forms.Textarea(attrs={
                'class': 'form-control',
                'rows': 3,
                'placeholder': '输入消息内容...'
            })
        }

class NewConversationForm(forms.Form):
    recipient = forms.CharField(
        label='收件人',
        widget=forms.TextInput(attrs={
            'class': 'form-control',
            'placeholder': '输入用户名'
        })
    )
    content = forms.CharField(
        widget=forms.Textarea(attrs={
            'class': 'form-control',
            'rows': 3,
            'placeholder': '输入消息内容...'
        })
    )